import axios from "~/axios";

// 查询列表
export function tableList(params) {
  return axios.get('/api/admin/product/feighttemplate/list', {
    params: params
  });
}

// 查询所有的省市及联
export function getCitys() {
  return axios.get('/api/admin/product/city/list');
}

// 通过id查询用户信息
export function getFeightTemplateInfo(id) {
  return axios.get('/api/admin/product/feighttemplate/info/' + id);
}

// 批量删除
export function batchRemove(idList) {
  return axios.post('/api/admin/product/feighttemplate/delete', idList);
}

// 新增或修改
export function saveOrUpdate(formData) {
  let url = ''
  if(formData.id === 0) {
    url = 'save'
  } else {
    url = 'update'
  }
  return axios.post('/api/admin/product/feighttemplate/' + url, formData);
}
